package com.atguigu.spring.factory;

import com.atguigu.spring.pojo.Student;
import org.springframework.beans.factory.FactoryBean;

public class StudentFactoryBeandemo01 implements FactoryBean {
    private String name;
    private int age;
    private String homeSpace;
    private String gender;
    @Override
    public Object getObject() throws Exception {
        Student student1 = new Student();
        student1.setName("name");
        student1.setAge(18);
        student1.setHomeSpace("homeSpace");
        student1.setGender("gender");
        return student1;
        //getobject的返回值交给bean
    }

    @Override
    public Class<?> getObjectType() {
        return Student.class;
    }
}
